﻿/*
 * Created by SharpDevelop.
 * User: xieen
 * Date: 2013-08-23
 * Time: 16:29
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;

namespace GoF23Learning._22.Chain_of_Responsibility.Refactor
{
	/// <summary>
	/// Description of BaseHandler.
	/// </summary>
	public abstract class BaseHandler
	{
		private  BaseHandler next;
		
		public BaseHandler Next {
			get { return next; }
			set { next = value; }
		}
		
		public BaseHandler(BaseHandler handler){
			this.next = handler;
		}
		
		public virtual void Request(){
			if(this.next != null)
			{
				this.next.Request();
			}
		}
		public abstract bool CandRequest(Request request);

	}
}
